<template>
	<view class="index">
		<view class="list" :style="{background:(showBorder == false?'transparent':'#fff')}">
			<view class="content">
				<view class="avatar">
					<image  :src="item.project_logo" mode="" class="image"></image>
					<!-- <image v-else :src="`${userInfo.url}/web_img/logo.jpg`" mode="" class="image"></image>  v-if="item.project_logo" -->
				</view>
				<view class="center">
					<view class="top">
						<view class="left" :style="{color:(showBorder == false?'#505050':'#000')}">
							项目名称：{{item.project_name || '暂无'}}</view>
						<!-- <view class="progress" v-if="showProgress"
							:style="{'background-image':(item.status==3?`url(${userInfo.url}/web_img/my/ywc.png)`:item.status==2?`url(${userInfo.url}/web_img/my/jxz.png)`:`url(${userInfo.url}/web_img/my/wwc.png)`)}">
							{{item.status==3?'已完成':item.status==2?'进行中':'未完成'}}
						</view> -->
						<view class="progress" v-if="showProgress" :style="{'background':(item.status==3?'#F8594E':item.status==2?'#157DFA':'#71C531')}">
							{{item.status==3?'已暂停':item.status==2?'建设中':'开发中'}}
						</view>
					</view>
					<view class="bottom">
						<view class="left" :style="{color:(showBorder == false?'#505050':'#000')}">
							项目编号：{{item.project_no || '暂无'}}</view>
						<span class="update" v-if="update">
							<slot name="update">
							</slot>
						</span>
						
					</view>
				</view>
				<view class="right" @click="detail">
					<slot name="rightDetail"></slot>
				</view>
			</view>
			<view class="border_data" v-if="showBorder">
				<view class="_border">
				</view>
			</view>
			<view class="bottom" v-if="probottom">
				<view class="time">
					<!-- <span class="timeValue">
						<slot name="botTime">
							{{item.upload_time.substring(0,10)}}
						</slot>
					</span> -->
					<view class="right" style="color: black;font-size: 24rpx;">
						<text style="color: #BABABA;">上传时间：
						
						<!-- <view class="">
							<slot name="botTime" >
								{{item.upload_time.substring(0,10)}}
							</slot>
						</view> -->
						
						</text>
						<span class="timeValue">
							<slot name="botTime">
								{{item.upload_time.substring(0,10)}}
							</slot>
						</span>
						<slot name="topTime"></slot>
					</view>
					
				</view>
				<!-- <view class="progress" v-if="showProgress"
					:style="{'background-image':'url(https://rndl.westts.cn/web_img/my/ywc.png)'}">
					已完成{{item.status}}{{item.project_no}}
				</view> -->
				<view class="right" style="font-size: 24rpx;color: #555EDE;border: 1px solid #555EDE;padding:4rpx 24rpx;border-radius: 20rpx;box-sizing: border-box;margin-right: 20rpx;">
					<slot name="topDetail"></slot>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	let userInfo = uni.getStorageSync('userInfo')
	export default {
		props: {
			list: [],
			id: '',
			showBorder: {
				default: true
			},
			probottom: {
				default: true
			},
			showProgress: {
				default: true
			},
			update: {//更新进度条
				default: false
			},
			item: {
				default: {}
			},
		},
		data() {
			return {
				form: {
					categorys: []
				},
				userInfo:userInfo
			}
		},
		onReachBottom() {

		},

		created() {
			 this.userInfo = uni.getStorageSync('userInfo')
			 // console.log( this.userInfo,' this.userInfo')
		},
		onReady() {

		},
		onShow() {

		},
		methods: {
			detail() {
				// console.log(1111)
			},
			goDetails(item) {
				uni.navigateTo({
					url: '/components/listDetail/Detail?type=1&data=' + JSON.stringify(item)
				})
			}
		}
	}
</script>
<style>
	/* @page{
		background-color: #E2E2E2;
	} */
	page {
		background-color: #f6f6f64d;
	}
</style>
<style lang="scss" scoped>
	.progress {
		width: 130rpx;
		height: 40rpx;
		background: gold;
		line-height: 25rpx;
		padding: 9rpx;
		color: #fff;
		text-align: center;
		border-top-left-radius:20rpx;
		border-bottom-left-radius:20rpx;
		box-sizing: border-box;
		font-size: 24rpx;
		margin-right: -10rpx;
		// width: 130rpx;
		// background-size: 100%;
		// background-repeat: no-repeat;
		// text-align: right;
		// background-image: url(../../static/Rectangle.png);
	}
	::v-deep .update {
		font-size: 28rpx;
		width: 130rpx;
		height: 40rpx;
		background: #F8594E;
		line-height: 25rpx;
		padding: 9rpx;
		color: #fff;
		text-align: center;
		border-top-left-radius:20rpx;
		border-bottom-left-radius:20rpx;
		box-sizing: border-box;
		font-size: 24rpx;
		margin-right: -10rpx;
	}
	.index {
		padding: 0 20rpx;
		font-size: 28rpx;

		.border_data {
			padding: 0 20rpx;

			._border {
				width: 100%;
				height: 1px;
				background-color:rgba(217, 217, 217, 0.3);
			}
		}

		.list {
			color: #505050;
			background: #fff;
			margin-top: 20rpx;
			border-radius: 10px;
			color: #fff;

			.content {
				display: flex;
				justify-content: center;
				align-items: center;
				padding: 20rpx;
				color: #505050;
				padding-right: 5rpx;
				.avatar {
					width: 90rpx;
					height: 90rpx;
					border-radius: 20rpx;
					padding-top: 10rpx;

					.image {
						width: 100%;
						height: 100%;
						border-radius: 8rpx;
					}
				}

				.center {
					flex: 1;
					display: flex;
					flex-direction: column;
					align-items: left;
					justify-content: center;
					margin-left: 20rpx;
					white-space: nowrap;
					text-overflow: ellipsis;
					overflow: hidden;
					.top {
						font-size: 26rpx;
						font-size: 26rpx;
						margin: 10px 0;
						display: flex;

						.right {
							font-size: 28rpx;
							color: #BABABA;
							color: #FFFFFF;
							// max-width: 62px;
						}

						.left {
							flex: 1;
							color: #FFFFFF;
							    white-space: nowrap;
							    text-overflow: ellipsis;
							    overflow: hidden;
						}
					}

					.bottom {
						font-size: 28rpx;
						padding-left: 0;

						.right {
							font-size: 22rpx;
							color: #FFFFFF;
							color: #157DFA;
							max-width: 62px;
						}

						.left {
							flex: 1;
							color: #FFFFFF;
							white-space: nowrap;
							text-overflow: ellipsis;
							overflow: hidden;
						}
					}
				}

				.right {
					color: #157DFA;
					font-size: 28rpx;
				}
			}

			.bottom {
				display: flex;
				align-items: center;
				font-size: 22rpx;
				padding-left: 20rpx;
				margin-top: 10rpx;

				.time {
					flex: 1;
					padding: 20rpx 0;
				}
				.timeValue {
					color: black;
				}

			
			}
		}
	}
</style>
